<?php
/**
 * Created by PhpStorm.
 * User: wzy12
 * Date: 2018/10/16
 * Time: 23:19
 */

namespace app\common\model;


use think\Model;

class UserAddress extends Model
{
    public function resList($id){
        $list = $this -> where('user_id', $id) -> paginate(10) -> each(function ($item, $key){
            $str = $item['province'].' '.$item['city'].' '.$item['district'].' '.$item['address'];
            $item['address'] = $str;

            return $item;
        });

        return $list;
    }
}